﻿using dz.loger.core;

namespace Dz.WorkerService
{
    internal class Task1 : BaseTaskItem
    {
        public Task1(string name, TimeSpan interval) : base(name, interval)
        { }

        protected override List<long> GetProcessIds()
        {
            List<long> rtn = new List<long>();

            for (long i = 0; i < 1000; i++)
            {
                rtn.Add(i);
            }

            return rtn;
        }
        protected override async Task Process(long processId)
        {
            LogUtil.Instance.Debug($"任务{Name} 执行{processId},threadid = {Thread.CurrentThread.ManagedThreadId}");
            await Task.Delay(new Random().Next(1000,1500));
        }
    }
}
